<template>
    <div class="header" :style="{
        backgroundImage: `url(${sellerHeader.avatar})`,
    }">
        <!-- 遮罩层 -->

        <div class="mask"></div>

        <div class="info">
            <div class="logo"><img :src="sellerHeader.avatar" alt="logo" /></div>
            <div class="title">
                <h2><span class="sp1">品牌</span>{{ sellerHeader.name }}</h2>
                <p class="p1">{{ sellerHeader.description }}</p>
                <p class="p2"> <span class="sp2">减</span> 在线支付满28减5，满50减10 <span class="sp3">5个&emsp;></span></p>
            </div>
        </div>
        <div class="gg">
            <p><span class="sp4">公告</span>{{ sellerHeader.bulletin }}</p>
        </div>


    </div>
</template>

<script>
import { mapActions, mapState } from 'vuex';
export default {
    data() {
        return {};
    },
    created() {
        //获取头部数据
        this.getSeller();
    },
    computed: {
        ...mapState(["sellerHeader"]),
    },
    methods: {
        ...mapActions(["getSeller"]),
    },
}
</script>

<style  scoped>
.header {
    height: 134px;
    background: #333;
    overflow: hidden;
    background-repeat: no-repeat;
    background-size: cover;
    position: relative;
}

.mask {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    background-color: rgba(7, 17, 27, 0.5);
    backdrop-filter: blur(10px);
}

.info {
    position: absolute;
    width: 100%;
    left: 0;
    top: 0;
    height: 100%;
    display: flex;
    color: white;

}

.info .title h2 {
    font-size: 16px;
    font-weight: 700;
    margin-top: 20px;
}
.title .p1{
    font-size: 12px;
    padding: 5px 0;
    color: rgb(255,255,255);
}
.title .p2{
    font-size: 10px;
    color: rgb(255,255,255);
    
}
.title .sp1{
    background-color: red;
    font-size: 12px;
    font-weight: 700;
    margin-right: 5px;
    padding: 2px;
    border-radius: 2px;
}
.title .sp2{
    background-color:white;
    font-size: 10px;
    font-weight: 700;
    color: red;
    padding: 1px 2px;
    border-radius: 2px;
    
}
.title .sp3{
    background-color:rgb(0,0,0,0.2);
    font-size: 10px;
    color:white;
    padding: 8px;
    border-radius: 12px;
    margin-left: 20px;
    
}
.sp4{
    color: gray;
    background-color: white;
    border-radius: 2px;
    margin-right: 10px;
}

.logo {
    padding: 24px 20px 0 24px
}

.logo img {
    width: 64px;
    height: 64px;
}

.gg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    font-size: 10px;
    color: #fff;
    padding-left: 12px;
    background: rgba(7, 17, 27, 0.2);
    color: rgb(255,255,255);
}

.gg p {
    height: 28px;
    line-height: 28px;
    width: 85%;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}
</style>